Skip to content

Loading Animation - #178

Open
ukaylee wants to merge 21 commits into
mainfrom
anatoli/loading-animation
Open

Loading Animation#178
ukaylee wants to merge 21 commits into
mainfrom
anatoli/loading-animation

Conversation

@ukaylee

@ukaylee ukaylee commented Sep 10, 2026

Copy link
Copy Markdown

Overview

Implemented loading animation according to design

Collaborated with Anatoli: I worked on adding the background image, animating the Uplift logo, and linking the intro animation to SignInView with a transition

Added state inside of SignInView to behave differently on the user's first open of the app to show the loading animation + animate the logo differently. It should not appear in any other use of SignInView (like on the profile)

Video

Screen.Recording.2026-09-09.at.10.43.36.PM.mov

amonsalve1 and others added 12 commits March 22, 2026 20:33
Bring the loading animation branch up to date with main (24 commits behind).

Resolved conflicts:
- User.swift, MainViewModel.swift: kept main's versions. The WIP
  workarounds (hardcoded goal value, commented-out User init) were
  only needed because the branch's .graphql files were stale.
- mountain_back / mountain_front Contents.json: kept main's filenames.
- project.pbxproj: kept both sides so IntroAnimationView.swift stays
  in the target alongside main's new files.

This also fixes the "Missing package product" build errors: the old
UserMutations.graphql declared workoutGoal as [String]! while the
backend expects Int!, so Apollo codegen failed and UpliftAPI/Package.swift
was never generated.
@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 4f236c9d-c973-4115-a648-27f6b6d2cd53


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@JiwonJeong414 JiwonJeong414 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work Kaylee! Just a couple of comments to consider 👍

{
"images" : [
{
"filename" : "intro_background.png",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we not have 2x 3x files for this? you need the 2x 3x file so that the photo does not get blurry. also do we use png for our assets or svgs can you check the other files?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks like pngs inside of Assets.xcassets

.offset(y: animateElements ? 0 : 200)
.animation(.smooth(duration: 2), value: animateElements)

Color.clear // to give enough space for logo!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stray code

@StateObject private var loginViewModel = LoginViewModel()
@State private var animateElements: Bool = false
@State private var showIntro = !SignInView.hasShownIntro

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm, this looks like state logic don't you think we can do something like
enum Phase {
case hidden
case entered
case transitioningToSignIn
case finished
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could either make this @observable or define it through your 2nd view model


// MARK: - Helpers

// logo properties

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's a lot of magic numbers (constants) that should be put into the constants file

// MARK: - Helpers

// logo properties
private var mainLogoSize: CGSize {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually think here is a good structure to try utilizing two view models try adding this @State private var animationViewModel = SignInAnimationViewModel() at the top and adding all these private vars and private func, good separation of concerns

Comment thread Uplift/Views/IntroAnimationView.swift Outdated

// MARK: - Views

private var backgroundImage: some View {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weird tab delete the tab starting from line 59

Comment thread Uplift/Views/IntroAnimationView.swift Outdated
)
}

// MARK: - Helpers

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here I feel like you could have a 2nd viewmodel for the animations try it and see if you like the 2nd viewmodel architecture

Comment thread Uplift/Views/IntroAnimationView.swift Outdated
guard height > 0 else { return }

DispatchQueue.main.async {
hasEntered = true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here let's not use Dispatchqueue

Comment thread Uplift/Views/IntroAnimationView.swift Outdated

onTransition?()

DispatchQueue.main.asyncAfter(deadline: .now() + 0.35) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here as well

Comment thread Uplift/Views/IntroAnimationView.swift Outdated
hasEntered = true

DispatchQueue.main.asyncAfter(deadline: .now() + 1.5) {
withAnimation(.smooth(duration: 0.35)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here as well

@JiwonJeong414 JiwonJeong414 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice Kaylee! I made a few more comments but I'm trusting you to fix them before merging. BTW you can track which comments you addressed by resolving them, it's easier for me to see as well the progress you are making.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is the same size as one above this looks sus 3x should have a file size bigger than the 2x

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here these are all the same size. in the figma there should be a way to export 2x, 3x of an asset

/// Constants used in IntroAnimation
enum IntroAnimation {
static let entranceDuration: Double = 1.0
static let entranceDelay: Double = 0.1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants